package com.bblocks.enums.flowCommonBeans;
/**
 * @author : chenHongLai
 * @Description :
 * @Date : created in 2019/6/27 19:52.
 */
public enum FlowImgTypeEnum {
    SCENE_CONFIRM(0, "现场确认图片"),
    HOUSE_AUTH(1, "购房认证图片"),
    HOUSE_INVOICE(2,"购房发票"),
    SEE_HOUSE_CONFIRM(3,"看房确认单"),
    BUY_HOUSE_CONTRACT(4,"购房合同、发票"),
    PAY_CERTIFICATE(5,"打款凭证"),
    ;

    private Integer value;
    private String message;

    public static Integer messageOf(String message) {
        FlowImgTypeEnum[] values = FlowImgTypeEnum.values();
        for (FlowImgTypeEnum statusEnum : values) {
            if (statusEnum.getMessage().equals(message)) {
                return statusEnum.getValue();
            }
        }
        return null;
    }

    public static String valueOf(int value) {
        FlowImgTypeEnum[] values = FlowImgTypeEnum.values();
        for (FlowImgTypeEnum stateEnum : values) {
            if (value == stateEnum.getValue()) {
                return stateEnum.getMessage();
            }
        }
        return null;
    }

    FlowImgTypeEnum(Integer value, String message) {
        this.value = value;
        this.message = message;
    }

    public Integer getValue() {
        return value;
    }
    public String getMessage() {
        return message;
    }

}
